VT-d: get rid of hardcode in iommu_flush_cache_entry
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Dec 2009 08:48:36 +0000 (08:48 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Dec 2009 08:48:36 +0000 (08:48 +0000)
commitda583c807c223b6532c8cf2791057c330011964a
treefcc809dc83307fa85ab06532becbcc4795665461
parent2cdc56dff4deea9438faad1013f49e9ceeaa15b2
VT-d: get rid of hardcode in iommu_flush_cache_entry

Currently iommu_flush_cache_entry uses a fixed size 8 bytes to flush
cache. But it also needs to flush caches with different sizes,
e.g. struct root_entry is 16 bytes. This patch fixes the hardcode by
using a parameter "size" to flush caches with different sizes.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/vtd.h